package com.tree;

import java.util.ArrayList;
import java.util.List;

public class mid {
    public static void main(String[] args) {

    }
        public  List<Integer> inorderTraversal(TreeNode root) {
            ArrayList<Integer> list = new ArrayList<>();
            te(list,root);
            return list;
        }
        public  void te(List<Integer> list,TreeNode root){
            if (root==null){
                return;
            }
            te(list,root.left);
            list.add(root.val);
            te(list,root.right);        
        }
}
